import request from "@/util/request";
import {post} from "axios";

export default {
    findAllStudents(){
        return request({
            url:"/student/list",
            method:"get"
        })
    },
    findByPage(page,pageSize){
        return request({
            url:`/student/findByPage/${page}/${pageSize}`,
            method:"get"
        })
    },
    search(page,pageSize,data){
        return request({
            url:`/student/search/${page}/${pageSize}`,
            method:"post",
            data
        })
    },
    save(data){
        return request({
            url: '/student/save',
            method: 'post',
            data
        })
    },
    update(data){
        return request({
            url: '/student/update',
            method: 'post',
            data
        })
    },
    delete(id){
        return request({
            url: `/student/delete/${id}`,
            method: 'delete',
        })
    },
    deleteBatch(ids){
        return request({
            url: `/student/deleteBatch`,
            method: 'delete',
            data:ids
        })
    }
}
